|
![](/i/fill.gif) |
Warp wrote:
> If POV-Ray supported recursive functions, then you could do them with
> those.
> In fact, I implemented the Mandelbrot pattern as a recursive function
> in a prototype version of POV-Ray 3.5, and it worked ok (it was acceptably
> fast).
What du you need recursion for? Most fractals I know of
(Mandelbrot included) are computed in simple iterations,
as in (pseudo-code):
FOR Y-coordinates [of the entire fractal image]
FOR X-coordinates
WHILE conditions (i.e.: |Z| < 4 AND num_loops < max_loops)
Iterate function (i.e.: Z = Z*Z + C [Mandelbrot])
END
Draw Pixel
END
END
Any end-recursive function can be written as an iteration.
And in most cases the iterative version will be faster.
> It's a bummer the recursion support didn't completely work out.
That is true, however. ;)
g.
--
++++++++++++++++ http://www.psico.ch/ ++++++++++++++++
Post a reply to this message
|
![](/i/fill.gif) |